package com.rjwh.dingdong.client.bean.localbean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created with Android Studio.
 * User: ryan.hoo.j@gmail.com
 * Date: 9/2/16
 * Time: 4:01 PM
 * Desc: Song
 */
public class Song implements Parcelable {

    private int id;
    private String programname;// 节目名称
    private String playcount;// 播放次数
    private String goodcount;// 赞次数
    private String coverurl;// 封面图
    private String audiourl;// 语音链接
    private String radioname;// 主播名称
    private String programid;// 节目编码
    private String albumname;// 专辑名称

    public String getProgramname() {
        return programname;
    }

    public void setProgramname(String programname) {
        this.programname = programname;
    }

    public String getPlaycount() {
        return playcount;
    }

    public void setPlaycount(String playcount) {
        this.playcount = playcount;
    }

    public String getGoodcount() {
        return goodcount;
    }

    public void setGoodcount(String goodcount) {
        this.goodcount = goodcount;
    }

    public String getCoverurl() {
        return coverurl;
    }

    public void setCoverurl(String coverurl) {
        this.coverurl = coverurl;
    }

    public String getAudiourl() {
        return audiourl;
    }

    public void setAudiourl(String audiourl) {
        this.audiourl = audiourl;
    }

    public String getAlbumname() {
        return albumname;
    }

    public void setAlbumname(String albumname) {
        this.albumname = albumname;
    }

    public String getRadioname() {
        return radioname;
    }

    public void setRadioname(String radioname) {
        this.radioname = radioname;
    }

    public String getProgramid() {
        return programid;
    }

    public void setProgramid(String programid) {
        this.programid = programid;
    }

    public Song() {
        // Empty
    }

    public Song(String displayName, String path) {
        this.programname = displayName;
        this.audiourl = path;
    }

    public Song(Parcel in) {
        readFromParcel(in);
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.id);
        dest.writeString(this.programname);
        dest.writeString(this.playcount);
        dest.writeString(this.goodcount);
        dest.writeString(this.coverurl);
        dest.writeString(this.audiourl);
        dest.writeString(this.radioname);
        dest.writeString(this.programid);
        dest.writeString(this.albumname);

    }

    public void readFromParcel(Parcel in) {
        this.id = in.readInt();
        this.programname = in.readString();
        this.playcount = in.readString();
        this.goodcount = in.readString();
        this.coverurl = in.readString();
        this.audiourl = in.readString();
        this.radioname = in.readString();
        this.programid = in.readString();
        this.albumname = in.readString() ;
    }

    public static final Creator<Song> CREATOR = new Creator<Song>() {
        @Override
        public Song createFromParcel(Parcel source) {
            return new Song(source);
        }

        @Override
        public Song[] newArray(int size) {
            return new Song[size];
        }
    };
}
